<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="target-densitydpi=device-dpi, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="../../../../public/css/general.css">
    <link rel="stylesheet" href="../../../../public/css/mint-ui/lib/style.css">
    <link rel="stylesheet" href="../../../../public/css/iconfont/iconfont.css">
    <link rel="stylesheet" href="../../../../public/css/wechat/mine.css">
    <title>白蔬贞</title>
</head>
<body>
<div id="account">
    <div class="top-bar">
        <a href="javascript:;" @click="goBack()">
            <i class="iconfont">&#xe665;</i>
        </a>
        <span v-text="tip">账号管理</span>
    </div>
    <!--占位-->
    <div class="placeholder"></div>
    <div class="cell" v-if="!isPasswordManager && !isStoreManager">
        <div class="item">
            <div class="title">门店管理</div>
            <div class="fotter" @click="toStoreManager()"><img src="../../../../public/images/right.png" alt=""></div>
        </div>
        <div class="item">
            <div class="title">密码管理</div>
            <div class="fotter" @click="toPasswordManager()"><img src="../../../../public/images/right.png" alt=""></div>
        </div>
    </div>
    <div class="button" v-if="!isPasswordManager && !isStoreManager">
        <img @click="logout()" src="../../../../public/images/logout.png" alt="退出登录">
    </div>

    <!--密码管理-->
    <div class="password-manager" v-if="isPasswordManager">
        <div class="form">
            <div class="form-row">
                <label for="passwordForm_tel">
                    手机号码：
                </label>
                <input type="tel" id="passwordForm_tel" name="tel" v-model.trim="passwordForm.tel" placeholder="输入11位手机号码">
            </div>
            <div class="form-row">
                <span>
                    <label for="passwordForm_validCode">
                        验&nbsp; 证&nbsp; 码：
                    </label>
                    <input type="tel" id="passwordForm_validCode" name="validCode" v-model.trim="passwordForm.validCode">
                    <button class="code-btn" v-text="passwordForm.codeMsg" :disabled="passwordForm.isDisabled" :class="{'code-btn_disabled': passwordForm.isDisabled}" @click="getValidCode(passwordForm)">获取验证码</button>
                </span>
            </div>
            <div class="form-row">
                <span>
                    <label for="passwordForm_password">
                        新&nbsp; 密&nbsp; 码：
                    </label>
                    <!--密码加密-->
                    <input type="password" id="passwordForm_password" name="password" v-model.trim="passwordForm.password" v-if="!passwordForm.isShow">
                    <!--<i class="iconfont iconfont-g iconfont-eye" v-if="!passwordForm.isShow" @click="passwordForm.isShow=!passwordForm.isShow">&#xe7d2;</i>-->
                    <img class="img-eye" src="../../../../public/images/show.png" alt="显示密码" v-if="passwordForm.isShow" @click="passwordForm.isShow=!passwordForm.isShow">
                    <!--显示密码-->
                    <input type="text" id="passwordForm_password" name="password" v-model.trim="passwordForm.password" v-if="passwordForm.isShow">
                    <!--<i class="iconfont iconfont-gray iconfont-eye" v-if="passwordForm.isShow" @click="passwordForm.isShow=!passwordForm.isShow">&#xe6df;</i>-->
                    <img class="img-eye" style="bottom: 0;" src="../../../../public/images/hide.png" alt="隐藏密码" v-if="!passwordForm.isShow" @click="passwordForm.isShow=!passwordForm.isShow">
                </span>
            </div>
            <div class="form-row">
                <label for="passwordForm_repeatPassword">
                    重复密码：
                </label>
                <input type="password" id="passwordForm_repeatPassword" name="repeatPassword" v-model.trim="passwordForm.repeatPassword">
            </div>
        </div>
        <div class="button" style="padding-top: 0;">
            <img src="../../../../public/images/confirm.png" alt="确定" @click="findPassword()">
        </div>
    </div>

    <!--门店管理-->
    <div class="store-manager" v-if="isStoreManager">
        <div class="store" v-for="store in storeList">
            <div class="item">
                <div class="top">
                    <div class="title" v-text="store.name"></div>
                    <div class="fotter" v-text="store.phone"></div>
                </div>
                <div class="content bzs-multi-text-ellipsis" v-text="'收货地址：'+store.location"></div>
                <div class="bottom">
                    <div class="label" :class="{'is-default': store.isDefault}" @click="setDefault(store)">
                        <img v-if="!store.isDefault" src="../../../../public/images/radio-unselected.png" alt="单选框">
                        <img v-if="store.isDefault" src="../../../../public/images/radio-selected1.png" alt="单选框">
                        设为默认
                    </div>
                    <div class="fotter">
                        <span @click="editStore(store)"><img src="../../../../public/images/edit.png" alt="编辑">编辑</span>
                        <span @click="deleteStore(store)"><img src="../../../../public/images/del.png" alt="删除">删除</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="button" style="padding-top: 25px;">
            <img src="../../../../public/images/new-store.png" alt="新增门店" @click="toNewStore()">
        </div>
    </div>
</div>
<script src="../../../../public/js/vue.js"></script>
<script src="../../../../public/css/mint-ui/lib/index.js"></script>
<script src="../../../../public/js/store.js"></script>
<script src="../../../../public/js/wechat/mine/account.js"></script>
</body>
</html>